﻿CREATE TABLE [dbo].[L_Dealings] (
    [id]                INT             IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [O_CompanyId]       INT             NULL,
    [O_CompanyName]     NVARCHAR (500)  NULL,
    [O_PaymentTypeId]   INT             CONSTRAINT [DF_Table_1_PaymentTypeId_2] DEFAULT ((0)) NULL,
    [O_PaymentTypeName] NVARCHAR (50)   CONSTRAINT [DF_Table_1_PaymentTypeName_2] DEFAULT ('') NULL,
    [O_BankId]          INT             CONSTRAINT [DF_Table_1_BankId_2] DEFAULT ((0)) NULL,
    [O_BankName]        NVARCHAR (50)   CONSTRAINT [DF_Table_1_BankName_2] DEFAULT ('') NULL,
    [I_CompanyId]       INT             NULL,
    [I_CompanyName]     NVARCHAR (500)  NULL,
    [I_PaymentTypeId]   INT             CONSTRAINT [DF_Table_1_O_PaymentTypeId1] DEFAULT ((0)) NULL,
    [I_PaymentTypeName] NVARCHAR (50)   CONSTRAINT [DF_Table_1_O_PaymentTypeName1] DEFAULT ('') NULL,
    [I_BankId]          INT             CONSTRAINT [DF_Table_1_O_BankId1] DEFAULT ((0)) NULL,
    [I_BankName]        NVARCHAR (50)   CONSTRAINT [DF_Table_1_O_BankName1] DEFAULT ('') NULL,
    [je]                DECIMAL (18, 2) NULL,
    [CreateDate]        DATETIME        CONSTRAINT [DF_L_Dealings_CreateDate] DEFAULT (getdate()) NULL,
    [Agent]             VARCHAR (10)    CONSTRAINT [DF_L_Dealings_Agent] DEFAULT ((0)) NULL,
    [AgentName]         NVARCHAR (50)   CONSTRAINT [DF_L_Dealings_AgentName] DEFAULT ('') NULL,
    [PZPerson]          VARCHAR (10)    CONSTRAINT [DF_L_Dealings_PZPerson] DEFAULT ('') NULL,
    [PZPersonName]      NVARCHAR (50)   CONSTRAINT [DF_L_Dealings_PZPersonName] DEFAULT ('') NULL,
    [SHPerson]          VARCHAR (10)    CONSTRAINT [DF_L_Dealings_SHPerson] DEFAULT ('') NULL,
    [SHPersonName]      NVARCHAR (50)   CONSTRAINT [DF_L_Dealings_SHPersonName] DEFAULT ('') NULL,
    [UserId]            VARCHAR (10)    CONSTRAINT [DF_L_Dealings_UserId] DEFAULT ('') NULL,
    [UserName]          NVARCHAR (50)   CONSTRAINT [DF_L_Dealings_UserName] DEFAULT ('') NULL,
    [Memo]              NVARCHAR (2000) CONSTRAINT [DF_L_Dealings_Memo] DEFAULT ('') NULL,
    [CateOneId]         INT             CONSTRAINT [DF_L_Dealings_CateOneId] DEFAULT ((0)) NULL,
    [CateOneName]       NVARCHAR (50)   CONSTRAINT [DF_L_Dealings_CateOneName] DEFAULT ('') NULL,
    [CateTwoId]         INT             CONSTRAINT [DF_L_Dealings_CateTwoId] DEFAULT ((0)) NULL,
    [CateTwoName]       NVARCHAR (50)   CONSTRAINT [DF_L_Dealings_CateTwoName] DEFAULT ('') NULL,
    [SubjectId]         INT             CONSTRAINT [DF_L_Dealings_SubjectId] DEFAULT ((0)) NULL,
    [SubjectName]       NVARCHAR (50)   CONSTRAINT [DF_L_Dealings_SubjectName] DEFAULT ('') NULL,
    CONSTRAINT [PK_L_Dealings] PRIMARY KEY CLUSTERED ([id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'结算方式', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'O_PaymentTypeId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'结算方式名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'O_PaymentTypeName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'结算方式', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'I_PaymentTypeId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'结算方式名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'I_PaymentTypeName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'je';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'借款日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'CreateDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'经办人', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'Agent';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'经办人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'AgentName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'批准人编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'PZPerson';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'批准人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'PZPersonName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审核人编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'SHPerson';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审核人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'SHPersonName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入人', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'UserName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'备注', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'L_Dealings', @level2type = N'COLUMN', @level2name = N'Memo';

